package com.java.admin.service.impl;

import com.java.admin.mapper.EmpMapper;
import com.java.admin.pojo.User;
import com.java.admin.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {

    @Resource
    private EmpMapper empMapper;


    /**
     * 账户登录验证，这里要做加密处理，先做验证在加上加密
     * @param username
     * @param pwd
     * @return
     */
    @Override
    public boolean selectLogin(@RequestParam String username,@RequestParam String pwd) {
        List<User> userList=empMapper.islogin(username,pwd);
        return userList.isEmpty();
    }
}
